package cn.sdormitory.smartdor.dao;

import cn.sdormitory.smartdor.entity.SdHygiene;
import cn.sdormitory.smartdor.vo.SdHygieneVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @创建人：zhouyang
 * @创建时间：2020/11/20 14:14
 * @version：V1.0
 */
@Mapper
public interface SdHygieneDao extends BaseMapper<SdHygiene> {
    public List<SdHygieneVo> getAppHygieneAll(@Param("checkDate") String checkDate, @Param("storey") String storey,@Param("buildingNo") String buildingNo);

    public String getDeOptionsById(@Param("hygieneId") Long hygieneId);

    SdHygiene getAppHygieneById(@Param("id") Long id);

    /**
     * 根据宿舍ID和 考核时间查询卫生考核信息
     * @param dormitoryId
     * @param checkDate
     * @return
     */
    public SdHygiene getHygieneByDormitoryIdAdndCheckDate(@Param("dormitoryId")Long dormitoryId,@Param("checkDate")String checkDate);

    /**
     * 根据ID 查询 卫生考核信息
     * @param id
     * @return
     */
    public  SdHygiene getHygieneById(@Param("id") Long id);

    SdHygieneVo getAppHygieneByBIdAndDate(@Param("bdormitoryId") Long bdormitoryId, @Param("checkDate") String checkDate);

    /**
     * 获得卫生差的宿舍
     * @return
     */
    List<SdHygiene> listHygieneBadDor(Map<String,Object> map);

    /**
     * 条件查询宿舍卫生差的宿舍
     * @param startDate
     * @param endDate
     * @param buildingNo
     * @param storey
     * @param dormitoryNo
     * @return
     */
    List<SdHygiene> findList(@Param("startDate")String startDate,
                             @Param("endDate")String endDate,
                             @Param("buildingNo")String buildingNo,
                             @Param("storey")String storey,
                             @Param("dormitoryNo")String dormitoryNo);
}
